package com.cloud.salon.common.base.entity.business;

import com.cloud.salon.common.base.constant.PaymentTypeConstant;
import com.cloud.salon.common.base.entity.BaseEntity;
import lombok.Data;

import javax.persistence.*;
import java.util.Date;

/**
 * @Description 付款
 * @Author wolf--LZH
 * @CreateDate 2019/4/21 0021 下午 7:42
 */
@Data
@Entity
@Table(name="payment")
public class Payment extends BaseEntity {

    // 所属记录
    @Column(nullable = false)
    private Integer recordId;
    // 付款日期
    @Column(nullable = false)
    private Date payDate;
    // 付款金额
    @Column(nullable = false)
    private Double payAmount;
    // 找零
    @Column(nullable = false, name = "[change]")
    private Double change;
    // 支付方式
    @Column(nullable = false)
    private Integer type;

    public Payment() {}

    public Payment(Integer recordId, Date payDate, Double payAmount, Integer type) {
        this.recordId = recordId;
        this.payDate = payDate;
        this.payAmount = payAmount;
        this.change = 0.0;
        this.type = type;
    }
}
